<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri='http://www.springframework.org/security/tags' prefix='security'%>

<jsp:include page="includes/head.jsp"/>
		
		<script language="JavaScript" type="text/JavaScript">
			function grabar(){
				document.forms[0].action = "grabar.htm";
				document.forms[0].submit();
			}
			
			function cancelar(){
				document.forms[0].action = "lista.htm";
				document.forms[0].submit();
			}

		
		</script>

	 <div id="contenedor">
	 
		<jsp:include page="includes/cabecera.jsp"/>
		
		<div id="cuerpo" align="center">
             <table class="anchoTotal" >
                 <tr>
                     <td id="anchoMenu" >
                        <jsp:include page="includes/menu.jsp"/>
                     </td>
                     <td id="anchoCuerpo">
                        <div id="contenido">
						
							  <form:form name="frm2" action="grabar.htm" method="post" modelAttribute="participante">
                                    
                                    <form:hidden path="idParticipante" />
                                    
                                    <h2>COMPLETAR REGISTRO DE PARTICIPANTE</h2>
                            		<c:if test="${not empty msgError}"><div class="errorMsg"> <c:out value="${msgError}"/> </div></c:if>
									<c:if test="${not empty mensaje}"><div class="success"> <c:out value="${mensaje}"/> </div></c:if>
									
                             		<table class="bloqueTablaLineal">
                             			<tr>
											<th>N&uacute;mero de Registro</th>
											<td>${participante.numeroRegistro}</td>
										</tr>
										<tr>
											<th>Pa&iacute;s</th>
											<td>${participante.pais}</td>
										</tr>
								<!-- 		
										<tr>
											<th>Nombre</th>
											<td><form:input path="nombre" size="20"/></td>
										</tr>
										<tr>
											<th>Ap. Paterno</th>
											<td><form:input path="paterno" size="20"/></td>
										</tr>
										<tr>
											<th>Ap. Materno</th>
											<td><form:input path="materno" size="20"/></td>
										</tr>
									 -->	
										<tr>
											<th>C&oacute;digo Operaci&oacute;n(VISA/MATERCARD)</th>
											<td><form:input path="codVisa" size="20" maxlength="20"/></td>
										</tr>
									<!-- 	<tr>
											<th>C&oacute;digo Operaci&oacute;n</th>
											<td><form:input path="codVisa" size="20" maxlength="20"/></td>
										</tr>
										 -->
									   <tr>
                                            <th>Vienen a reuniones previas:</th>
                                            <td colspan="3"><form:checkbox path="reunionesPrevias" value="1"/></td>
                                        </tr>
										<tr>
											<th>Estado Transacci&oacute;n</th>
											<td><form:select path="estadoTransaccion"  cssStyle="height: 20px; width: 180px; font-family: Arial; font-size: 9pt">
													<form:option value="">-Seleccionar-</form:option>
													<form:option value="DENEGADO">DENEGADO</form:option>
													<form:option value="LIQUIDADO">LIQUIDADO</form:option>
												</form:select>
											</td>
										</tr>
										<tr  class="uno">
											<th>Tipo Comprobante</th>
											<td>
												<form:select path="tipoComprobante"  cssStyle="height: 20px; width: 180px; font-family: Arial; font-size: 9pt">
													<form:option value="1">Boleta</form:option>
													<form:option value="2">Factura</form:option>
												</form:select>
											</td>
										</tr>
										<tr>
											<th>Dinero Faltante (US$)</th>
											<td><form:input path="dineroFaltante" size="20"/></td>
										</tr>
										<tr>
											<th>Estado del Registro</th>
											<td>
												<form:select path="estatuspago.idStatus"  cssStyle="height: 20px; width: 180px; font-family: Arial; font-size: 9pt">
													<form:options items="${lStatus}" itemLabel="nombre" itemValue="idStatus"/>
												</form:select>
												
											</td>
										</tr>
										
										<c:if test="${not empty participante.transferenciabancarias}">
											<c:if test="${not empty participante.transferenciabancarias}">
						                      	<c:forEach items="${participante.transferenciabancarias}" var="trans">
						                      	
						                        <tr>
													<th>Banco de Transferencia</th>
													<td>
										      			<input type="hidden" name="idtransferenciaBancaria" value="${trans.idtransferenciaBancaria}"/>		
				                            			<input type="text" name="banco" value="${trans.banco}"/>
				                            	  </td>
							                        <th>Fecha de Transferencia</th>
							                        <td>
										      			<input type="text" name="fechaDeTransferencia" value="${trans.fechaDeTransferencia}"/>
							                        </td>	
												</tr>
						                    	</c:forEach>
						                    </c:if>
										</c:if>
										
										<tr>
											<th>Observaciones</th>
											<td><form:textarea path="observaciones" cols="30" rows="4"/></td>
										</tr>
										<tr>
											<th>Persona o Autoridad Muy Importante</th>
											<td><form:checkbox path="isImportante" value="1"/></td>	
										</tr>
										<tr>
											<th>Cargo</th>
											<td><form:input path="cargo" size="20"/></td>
										</tr>
									</table>
								  
                                  </form:form>
								                                        
                                    <center>
                                        <table summary="Contenedor Botones"
                                               class="tablaAnchoAjustable">
                                            <tr>
                                                <td>
                                                    <ul class="enlacesCentroAjustables">
                                                        <li>
                                                        	<input type="button" onClick="javascript:grabar();" class="boton" value="Registrar">
                                                        	<input type="button" onClick="javascript:cancelar();" class="boton" value="Cancelar">	
                                                       </li>
                                                    </ul>
                                                </td>
                                            </tr>
                                        </table>
                                    </center>
							
						</div>
					</td>
				</tr>
			</table>
		</div>
	 </div>
		 <jsp:include page="includes/pie.jsp" flush="true"/>